Next: Other C Commands, Previous: Electric C, Up: C Modes
If you want to delete an entire block of whitespace at point, you can use hungry deletion. This deletes all the contiguous whitespace either before point or after point in a single operation. Whitespace here includes tabs and newlines, but not comments or preprocessor commands.
c-hungry-delete-backwards
).
c-hungry-delete-forward
).
As an alternative to the above commands, you can enable hungry delete mode. When this feature is enabled (indicated by ‘/h’ in the mode line after the mode name), a single <DEL> deletes all preceding whitespace, not just one space, and a single C-c C-d (but not plain <Delete>) deletes all following whitespace.
c-toggle-hungry-state
). With a prefix argument,
this command turns the hungry-delete feature on if the argument is
positive, and off if it is negative.
The variable c-hungry-delete-key
controls whether the
hungry-delete feature is enabled.